//获取附近地点的位置（没有玩家）
private ["_pos", "_locs", "_roads"];
private _pos = _this select 0;

//突击队最远2499 
_locs = [];
_locs = nearestLocations [_pos, ["NameCityCapital","NameCity","NameVillage"], 2000, _pos];


//还没有就两公里处随机选点
if(count _locs == 0) exitWith
{
	_pos = _pos getPos [1200 + random 800, random 360];
	while{!([_pos, 0] call fn_checkPos)}do
	{
		_pos = _pos getPos [1200 + random 800, random 360];
	};
	_pos
};

//选最远的一个
_pos = locationPosition (_locs select ((count _locs) - 1));

//选择道路（附近无载具建筑）
_roads = [];
_roads = (_pos nearRoads 300) select
{
	private _nearObj = [];
	_nearObj = nearestObjects [position _x, ["Car","Tank","Air","House", "Building"], 2];
	((count _nearObj) == 0)
};

//无玩家
_roads = _roads select
{
	private _roadPos = _x;
	{
		if(_x distance2D _roadPos < 500) exitWith
		{
			false
		}
	}forEach (call fn_getPlayerRed);
	true
};



if (count _roads == 0)  then
{
//随机选点
	_pos = _pos getPos [1200 + random 800, random 360];
	while{!([_pos, 0] call fn_checkPos)}do
	{
		_pos = _pos getPos [1200 + random 800, random 360];
	};
}
else
{
	_pos = position (selectRandom _roads);
};


_pos



